package com.tl.spider.config;

import java.io.IOException;

import com.tl.spider.utils.common_utils.PropertiesUtil;

/**
 * 常用配置信息类,存储全局配置信息
 * 
 * @date 2021年7月16日
 * @author Antg
 */
public class Config {
	/**
	 * 默认读取config.properties,默认字符utf-8
	 */
	public static PropertiesUtil prop;
	static {
		// 这里的静态代码块是顺序执行的,所以得放在这里
		try {
			prop = new PropertiesUtil();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static String mysql_driver = prop.getValue("mysql_driver");
	public static String mysql_url = prop.getValue("mysql_url");
	public static String mysql_username = prop.getValue("mysql_username");
	public static String mysql_password = prop.getValue("mysql_password");
	public static String seed_file = prop.getValue("seed_file");
	public static String seed_charset = prop.getValue("seed_charset");
	public static String web_page_charset = prop.getValue("web_page_charset");
	public static int statistic_uniq_threshold = Integer.parseInt(prop
			.getValue("statistic_uniq_threshold"));
	public static String statistic_uniq_set_name = prop
			.getValue("statistic_uniq_set_name");
	public static String statistic_allNum_name = prop
			.getValue("statistic_allNum_name");
	public static String statistic_date_name = prop
			.getValue("statistic_date_name");
	public static long timer_task_time_out = Long.parseLong(prop
			.getValue("timer_task_time_out")) * 1000;

}
